package com.supms.course.domain;

import com.ruoyi.common.core.xss.Xss;
import com.ruoyi.system.api.domain.SysDept;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.annotation.Excel.ColumnType;
import com.ruoyi.common.core.annotation.Excel.Type;
import com.ruoyi.common.core.web.domain.BaseEntity;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 职工管理对象 supm_teacher
 * 
 * @author LiangHao
 * @date 2022-02-24
 */
public class Teacher extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @Excel(name = "职工序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
    private Long tId;

    /** 部门ID */
    @Excel(name = "部门编号", type = Type.IMPORT)
    private Long deptId;

    /** 教职工编号 */
    @Excel(name = "职工工号", cellType = ColumnType.STRING)
    private String tNum;

    /** 教职工姓名 */
    @Excel(name = "职工姓名", cellType = ColumnType.STRING)
    private String tName;

    /** 邮箱 */
    @Excel(name = "邮箱")
    private String email;

    /** 电话号码 */
    @Excel(name = "电话号码")
    private String phonenumber;

    /** 教职工性别（0男 1女 2未知） */
    @Excel(name = "性别", readConverterExp = "0=男,1=女,2=未知")
    private String sex;

    /** 状态（0正常 1停用） */
    private String status;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 部门对象 */
    private SysDept dept;

    public SysDept getDept() {
        return dept;
    }

    public void setDept(SysDept dept) {
        this.dept = dept;
    }

    public void settId(Long tId)
    {
        this.tId = tId;
    }

    public Long gettId() 
    {
        return tId;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void settNum(String tNum) 
    {
        this.tNum = tNum;
    }

    @Xss(message = "职工编号不能包含脚本字符")
    @NotBlank(message = "职工编号不能为空")
    @Size(min = 0, max = 30, message = "职工编号长度不能超过30个字符")
    public String gettNum() 
    {
        return tNum;
    }
    public void settName(String tName) 
    {
        this.tName = tName;
    }

    @Xss(message = "职工姓名不能包含脚本字符")
    @Size(min = 0, max = 20, message = "职工姓名长度不能超过20个字符")
    public String gettName() 
    {
        return tName;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    @Email(message = "邮箱格式不正确")
    @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
    public String getEmail() 
    {
        return email;
    }
    public void setPhonenumber(String phonenumber) 
    {
        this.phonenumber = phonenumber;
    }

    @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
    public String getPhonenumber() 
    {
        return phonenumber;
    }
    public void setSex(String sex) 
    {
        this.sex = sex;
    }

    public String getSex() 
    {
        return sex;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("tId", gettId())
            .append("deptId", getDeptId())
            .append("tNum", gettNum())
            .append("tName", gettName())
            .append("email", getEmail())
            .append("phonenumber", getPhonenumber())
            .append("sex", getSex())
            .append("status", getStatus())
            .append("delFlag", getDelFlag())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("dept", getDept())
            .toString();
    }
}
